package com.sdry.mapper.cb;

import com.sdry.model.cb.AnomalyRecordsEntity;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author cb
 */
public interface AnomalyRecordsMapper {

    /**
     * 列表
     *
     * @param anomaly
     * @param
     * @return
     */
    List<AnomalyRecordsEntity> getAnomalyRecordsList(AnomalyRecordsEntity anomaly);

    /**
     * 总数
     *
     * @param anomaly
     * @param
     * @return
     */
    Integer getAnomalyRecordsTotal(AnomalyRecordsEntity anomaly);

    /**
     * 添加
     *
     * @param anomaly
     * @return
     */
    Integer addAnomalyRecords(AnomalyRecordsEntity anomaly);

    /**
     * 修改
     *
     * @param anomaly
     * @return
     */
    Integer updateAnomalyRecords(AnomalyRecordsEntity anomaly);

    /**
     * 物料id
     *
     * @param anomId
     * @return
     */
    Integer deleteAnomalyRecords(@Param("anomId") Long anomId);

    /**
     * 所有的单据
     *
     * @param wareHouseId
     * @return
     */
    @Select("select receive_number from jy_receive where warehouse_id = #{wareHouseId}")
    List<String> getReceiveNumber(@Param("wareHouseId") Long wareHouseId);

    Integer deleteAnomalyRecordsState(@Param("anomId") long anomId, @Param("name") String name);


}
